package com.ddwl.goods.dao;

import com.ddwl.common.dao.TkDao;
import com.ddwl.goods.dao.mapper.ItemTopicMapper;
import com.ddwl.goods.model.ItemTopic;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class ItemTopicDao extends TkDao<ItemTopicMapper,ItemTopic> {

    @Autowired
    private ItemTopicMapper itemTopicMapper;

    public int deleteByTopicId(String topicId){
        return  itemTopicMapper.deleteByTopicId(topicId);
    }

    public int deleteByItemId(String itemId){
        return  itemTopicMapper.deleteByItemId(itemId);
    }

    public int deleteByItemTopicId(String itemId,String topicId){
        return itemTopicMapper.deleteByItemTopicId(itemId,topicId);
    }

    public int insertByList(List<ItemTopic> list){
        return itemTopicMapper.insertByList(list);
    }
}
